
<!DOCTYPE html>
<html lang="en" class="loading">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>学习uni-app - Hexo</title>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="google" content="notranslate" />
    <meta name="keywords" content="Fechin,"> 
    <meta name="description" content="学习uni-app(建议使用Hbuild进行编译)1. uni-app里面的配置文件和微信小程序一样,在pages.json里面example 全局配置12345678&amp;quot;globalSty,"> 
    <meta name="author" content="John Doe"> 
    <link rel="alternative" href="atom.xml" title="Hexo" type="application/atom+xml"> 
    <link rel="icon" href="/hexo/img/favicon.png"> 
    
    
<link rel="stylesheet" href="/hexo/css/diaspora.css">

	<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <script>
         (adsbygoogle = window.adsbygoogle || []).push({
              google_ad_client: "ca-pub-8691406134231910",
              enable_page_level_ads: true
         });
    </script>
    <script async custom-element="amp-auto-ads"
        src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js">
    </script>
<meta name="generator" content="Hexo 5.3.0"></head>

<body class="loading">
    <span id="config-title" style="display:none">Hexo</span>
    <div id="loader"></div>
    <div id="single">
    <div id="top" style="display: block;">
    <div class="bar" style="width: 0;"></div>
    <a class="iconfont icon-home image-icon" href="javascript:;" data-url="https://gitee.com/codewhya"></a>
    <div title="播放/暂停" class="iconfont icon-play"></div>
    <h3 class="subtitle">学习uni-app</h3>
    <div class="social">
        <div>
            <div class="share">
                <a title="获取二维码" class="iconfont icon-scan" href="javascript:;"></a>
            </div>
            <div id="qr"></div>
        </div>
    </div>
    <div class="scrollbar"></div>
</div>

    <div class="section">
        <div class="article">
    <div class='main'>
        <h1 class="title">学习uni-app</h1>
        <div class="stuff">
            <span>二月 23, 2021</span>
            

        </div>
        <div class="content markdown">
            <h2 id="学习uni-app-建议使用Hbuild进行编译"><a href="#学习uni-app-建议使用Hbuild进行编译" class="headerlink" title="学习uni-app(建议使用Hbuild进行编译)"></a>学习uni-app(建议使用Hbuild进行编译)</h2><h3 id="1-uni-app里面的配置文件和微信小程序一样-在pages-json里面"><a href="#1-uni-app里面的配置文件和微信小程序一样-在pages-json里面" class="headerlink" title="1. uni-app里面的配置文件和微信小程序一样,在pages.json里面"></a>1. uni-app里面的配置文件和微信小程序一样,在pages.json里面</h3><h3 id="example-全局配置"><a href="#example-全局配置" class="headerlink" title="example 全局配置"></a>example 全局配置</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">&quot;globalStyle&quot;</span>: &#123;</span><br><span class="line">		<span class="string">&quot;navigationBarTextStyle&quot;</span>: <span class="string">&quot;white&quot;</span>,<span class="comment">//导航栏文字的颜色</span></span><br><span class="line">		<span class="string">&quot;navigationBarTitleText&quot;</span>: <span class="string">&quot;我的uni-app&quot;</span>,<span class="comment">//导航栏标题</span></span><br><span class="line">		<span class="string">&quot;navigationBarBackgroundColor&quot;</span>: <span class="string">&quot;#eb4450&quot;</span>,<span class="comment">//导航栏背景色（同下）</span></span><br><span class="line">		<span class="string">&quot;backgroundColor&quot;</span>: <span class="string">&quot;#4CD964&quot;</span>,<span class="comment">//下拉刷新时的背景色尽量写#开头的颜色red green等等在微信小程序报错hexColor</span></span><br><span class="line">		<span class="string">&quot;enablePullDownRefresh&quot;</span>:<span class="literal">true</span>,<span class="comment">//下拉刷新的框</span></span><br><span class="line">		<span class="string">&quot;backgroundTextStyle&quot;</span>:<span class="string">&quot;light&quot;</span><span class="comment">//下拉loading样式只有light和dark</span></span><br><span class="line">	&#125;</span><br></pre></td></tr></table></figure>
<h3 id="创建页面是以-vue为后缀名创建的-但是标签是微信小程序里面的标签例如view引入在pages-json进行引入和小程序一模一样样式也可以单独进行配置例如h5"><a href="#创建页面是以-vue为后缀名创建的-但是标签是微信小程序里面的标签例如view引入在pages-json进行引入和小程序一模一样样式也可以单独进行配置例如h5" class="headerlink" title="创建页面是以.vue为后缀名创建的,但是标签是微信小程序里面的标签例如view引入在pages.json进行引入和小程序一模一样样式也可以单独进行配置例如h5"></a>创建页面是以.vue为后缀名创建的,但是标签是微信小程序里面的标签例如view引入在pages.json进行引入和小程序一模一样样式也可以单独进行配置例如h5</h3><h3 id="example-文件的引入和样式的配置"><a href="#example-文件的引入和样式的配置" class="headerlink" title="example 文件的引入和样式的配置"></a>example 文件的引入和样式的配置</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">&quot;pages&quot;</span>: [ <span class="comment">//pages数组中第一项表示应用启动页，参考：https://uniapp.dcloud.io/collocation/pages</span></span><br><span class="line">	&#123;</span><br><span class="line">		<span class="string">&quot;path&quot;</span>:<span class="string">&quot;pages/message/message&quot;</span>,</span><br><span class="line">		<span class="string">&quot;style&quot;</span>:&#123;</span><br><span class="line">			<span class="string">&quot;navigationBarTitleText&quot;</span>:<span class="string">&quot;信息页&quot;</span>,</span><br><span class="line">			<span class="string">&quot;h5&quot;</span>:&#123;</span><br><span class="line">				<span class="string">&quot;pullToRefresh&quot;</span>:&#123;</span><br><span class="line">					<span class="string">&quot;color&quot;</span>:<span class="string">&quot;#F0AD4E&quot;</span><span class="comment">//h5中设置下拉刷新的样式并不是backgroundtextstyle而是pullToRefresh</span></span><br><span class="line">				&#125;</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;</span><br><span class="line">	&#125;,</span><br><span class="line">		&#123;</span><br><span class="line">			<span class="string">&quot;path&quot;</span>: <span class="string">&quot;pages/index/index&quot;</span>,</span><br><span class="line">			<span class="string">&quot;style&quot;</span>: &#123;</span><br><span class="line">				<span class="string">&quot;navigationBarTitleText&quot;</span>: <span class="string">&quot;我的uni-app&quot;</span></span><br><span class="line">			&#125;</span><br><span class="line">		&#125;</span><br><span class="line">	</span><br><span class="line">	],</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h3 id="tabBar和微信小程序的语法一模一样-虽然list里面写了路径但是pages里面仍然要写路径并且路径要放在首位才能将tabbar显现出来否则就是别的页面在上面"><a href="#tabBar和微信小程序的语法一模一样-虽然list里面写了路径但是pages里面仍然要写路径并且路径要放在首位才能将tabbar显现出来否则就是别的页面在上面" class="headerlink" title="tabBar和微信小程序的语法一模一样(虽然list里面写了路径但是pages里面仍然要写路径并且路径要放在首位才能将tabbar显现出来否则就是别的页面在上面)"></a>tabBar和微信小程序的语法一模一样(虽然list里面写了路径但是pages里面仍然要写路径并且路径要放在首位才能将tabbar显现出来否则就是别的页面在上面)</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">&quot;tabBar&quot;</span>: &#123;</span><br><span class="line">	<span class="string">&quot;list&quot;</span>: [&#123;</span><br><span class="line">			<span class="string">&quot;pagePath&quot;</span>: <span class="string">&quot;pages/tabbar/home&quot;</span>,</span><br><span class="line">			<span class="string">&quot;text&quot;</span>: <span class="string">&quot;首页&quot;</span>,</span><br><span class="line">			<span class="string">&quot;iconPath&quot;</span>: <span class="string">&quot;static/images/tabbar/home.png&quot;</span>,</span><br><span class="line">			<span class="string">&quot;selectedIconPath&quot;</span>: <span class="string">&quot;static/images/tabbar/home1.png&quot;</span></span><br><span class="line">		&#125;,</span><br><span class="line">		&#123;</span><br><span class="line">			<span class="string">&quot;pagePath&quot;</span>: <span class="string">&quot;pages/tabbar/key&quot;</span>,</span><br><span class="line">			<span class="string">&quot;text&quot;</span>: <span class="string">&quot;钥匙&quot;</span>,</span><br><span class="line">			<span class="string">&quot;iconPath&quot;</span>: <span class="string">&quot;static/images/tabbar/key.png&quot;</span>,</span><br><span class="line">			<span class="string">&quot;selectedIconPath&quot;</span>: <span class="string">&quot;static/images/tabbar/key1.png&quot;</span></span><br><span class="line">		&#125;,</span><br><span class="line">		&#123;</span><br><span class="line">			<span class="string">&quot;pagePath&quot;</span>: <span class="string">&quot;pages/tabbar/contact&quot;</span>,</span><br><span class="line">			<span class="string">&quot;text&quot;</span>: <span class="string">&quot;联系人&quot;</span>,</span><br><span class="line">			<span class="string">&quot;iconPath&quot;</span>: <span class="string">&quot;static/images/tabbar/phone.png&quot;</span>,</span><br><span class="line">			<span class="string">&quot;selectedIconPath&quot;</span>: <span class="string">&quot;static/images/tabbar/phone1.png&quot;</span></span><br><span class="line">		&#125;,</span><br><span class="line">		&#123;</span><br><span class="line">			<span class="string">&quot;pagePath&quot;</span>: <span class="string">&quot;pages/tabbar/mine&quot;</span>,</span><br><span class="line">			<span class="string">&quot;text&quot;</span>: <span class="string">&quot;我的&quot;</span>,</span><br><span class="line">			<span class="string">&quot;iconPath&quot;</span>: <span class="string">&quot;static/images/tabbar/contact.png&quot;</span>,</span><br><span class="line">			<span class="string">&quot;selectedIconPath&quot;</span>: <span class="string">&quot;static/images/tabbar/contact1.png&quot;</span></span><br><span class="line">		&#125;</span><br><span class="line">	]</span><br><span class="line">&#125;,</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h3 id="condition模式配置相当于微信小程序里面的添加编译-微信小程序需要自己手动调，其他的会自动跳转到配置页"><a href="#condition模式配置相当于微信小程序里面的添加编译-微信小程序需要自己手动调，其他的会自动跳转到配置页" class="headerlink" title="condition模式配置相当于微信小程序里面的添加编译(微信小程序需要自己手动调，其他的会自动跳转到配置页)"></a>condition模式配置相当于微信小程序里面的添加编译(微信小程序需要自己手动调，其他的会自动跳转到配置页)</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">&quot;condition&quot;</span>:&#123;</span><br><span class="line">	<span class="string">&quot;current&quot;</span>:<span class="number">0</span>,</span><br><span class="line">	<span class="string">&quot;list&quot;</span>:[<span class="comment">//list是一个数组</span></span><br><span class="line">		&#123;</span><br><span class="line">			<span class="string">&quot;name&quot;</span>:<span class="string">&quot;详情页&quot;</span>,</span><br><span class="line">			<span class="string">&quot;path&quot;</span>:<span class="string">&quot;pages/detail/detail&quot;</span>,</span><br><span class="line">			<span class="string">&quot;query&quot;</span>:<span class="string">&quot;id=80&quot;</span></span><br><span class="line">		&#125;</span><br><span class="line">	]</span><br><span class="line">&#125;,</span><br></pre></td></tr></table></figure>
<h3 id="组件（标签和微信小程序一样但具体的参数限制）"><a href="#组件（标签和微信小程序一样但具体的参数限制）" class="headerlink" title="组件（标签和微信小程序一样但具体的参数限制）"></a>组件（标签和微信小程序一样但具体的参数限制）</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">text:</span><br><span class="line">selectable,space,decode但是我的selectable无效(为什么)</span><br><span class="line">view:</span><br><span class="line">hover-class(按住时的class),:hover-stop-propagation(阻止自己的父元素及以上的hover-class),:hover-start-time(按住多久触发):hover-stay-class(触发后延迟多久)</span><br><span class="line">image和button和微信小程序基本一致</span><br></pre></td></tr></table></figure>
<h3 id="样式-选择器无效"><a href="#样式-选择器无效" class="headerlink" title="样式(*选择器无效)"></a>样式(*选择器无效)</h3><p>1.app.vue中的样式是全局样式<br>2.单位和微信小程序一样使用rpx（响应式的单位）<br>3.iconfont.css在app.vue引入全局都可以通用</p>
<hr>
<h4 id="数据绑定和渲染和vue2的一模一样-data进行存储数据-v-bind-v-for都可以使用"><a href="#数据绑定和渲染和vue2的一模一样-data进行存储数据-v-bind-v-for都可以使用" class="headerlink" title="数据绑定和渲染和vue2的一模一样(data进行存储数据,v-bind,v-for都可以使用)"></a>数据绑定和渲染和vue2的一模一样(data进行存储数据,v-bind,v-for都可以使用)</h4><h4 id="生命周期-应用，页面和组件三类生命周期其中组件生命周期就是vue的生命周期"><a href="#生命周期-应用，页面和组件三类生命周期其中组件生命周期就是vue的生命周期" class="headerlink" title="生命周期(应用，页面和组件三类生命周期其中组件生命周期就是vue的生命周期)"></a>生命周期(应用，页面和组件三类生命周期其中组件生命周期就是vue的生命周期)</h4><h4 id="下拉刷新"><a href="#下拉刷新" class="headerlink" title="下拉刷新"></a>下拉刷新</h4><p>1.全局配置pages.json里面进行配置enablePullDownRefresh属性<br>2.函数uni.startPullDownRefresh({})，onPullDownRefresh可以监听到刷新从而处理事件uni.stopPullDownRefresh()停止刷新</p>
<h4 id="触底刷新"><a href="#触底刷新" class="headerlink" title="触底刷新"></a>触底刷新</h4><p>onReachBottom函数(触底时触发函数)和onLoad同层次可以在pages.json设置触底距离style(onReachBottomDistance:a(默认单位px可以不写))</p>
<h4 id="get请求-为什么pc请求成功，微信小程序不成功（未校验合法域名）"><a href="#get请求-为什么pc请求成功，微信小程序不成功（未校验合法域名）" class="headerlink" title="get请求(为什么pc请求成功，微信小程序不成功（未校验合法域名）)"></a>get请求(为什么pc请求成功，微信小程序不成功（未校验合法域名）)</h4><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="title">getUrl</span>(<span class="params"></span>)</span>&#123;<span class="comment">//默认是get请求可以更改methods:&quot;Get&quot;(大写)</span></span><br><span class="line">		uni.request(&#123;</span><br><span class="line">			url:<span class="string">&quot;static/stateJson/angel.json&quot;</span>,</span><br><span class="line">			<span class="function"><span class="title">success</span>(<span class="params">ret</span>)</span>&#123;</span><br><span class="line">				<span class="built_in">console</span>.log(ret.data)				</span><br><span class="line">			&#125;,</span><br><span class="line">			<span class="function"><span class="title">fail</span>(<span class="params">err</span>)</span> &#123;</span><br><span class="line">				<span class="built_in">console</span>.log(err)</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;)</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="内存存储数据"><a href="#内存存储数据" class="headerlink" title="内存存储数据"></a>内存存储数据</h3><p>1.异步数据存取，读取，删除缓存(uni.setStorage,uni.getStorage,uni.removeStorage)<br>2.同步数据存取，读取，删除缓存(uni.setStorageSync,uni.getStorageSync,uni.removeStorageSync)<br>3.读取全部缓存数据</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="title">allStrong</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">			uni.getStorageInfo(&#123;</span><br><span class="line">				<span class="function"><span class="title">success</span>(<span class="params">res</span>)</span> &#123;</span><br><span class="line">					<span class="built_in">console</span>.log(res)</span><br><span class="line">				&#125;</span><br><span class="line">			&#125;)</span><br><span class="line">		&#125;</span><br></pre></td></tr></table></figure>
<h4 id="图片的选择-uni-chooseImage"><a href="#图片的选择-uni-chooseImage" class="headerlink" title="图片的选择(uni.chooseImage({}))"></a>图片的选择(uni.chooseImage({}))</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">uni.chooseImage(&#123;</span><br><span class="line">				count:6,</span><br><span class="line">				success: (ret) &#x3D;&gt; &#123;</span><br><span class="line">					console.log(ret)</span><br><span class="line">					this.imgurl &#x3D; ret.tempFilePaths</span><br><span class="line">				&#125;</span><br><span class="line">			&#125;)</span><br><span class="line">			其中回调函数写成 success(ret)&#123;&#125;这样时，imgurl赋值失败为什么呢????	</span><br></pre></td></tr></table></figure>
<h4 id="图片预览-uni-previewImage-其中indicator，loop-longPressActions好像无效"><a href="#图片预览-uni-previewImage-其中indicator，loop-longPressActions好像无效" class="headerlink" title="图片预览(uni.previewImage)其中indicator，loop,longPressActions好像无效"></a>图片预览(uni.previewImage)其中indicator，loop,longPressActions好像无效</h4><h3 id="跨平台编译-注释-ifdef-平台-语句-注释-endif"><a href="#跨平台编译-注释-ifdef-平台-语句-注释-endif" class="headerlink" title="跨平台编译(注释+ #ifdef+平台+语句+注释+#endif)"></a>跨平台编译(注释+ #ifdef+平台+语句+注释+#endif)</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">css html也是如此 举例javascript</span><br><span class="line"><span class="comment">// #ifdef H5  </span></span><br><span class="line">		<span class="built_in">console</span>.log(<span class="string">&quot;我是h5liomianonload&quot;</span>)</span><br><span class="line">		<span class="comment">// #endif</span></span><br></pre></td></tr></table></figure>
<h4 id="navigator的跳转方式主要是open-type的选值不同"><a href="#navigator的跳转方式主要是open-type的选值不同" class="headerlink" title="navigator的跳转方式主要是open-type的选值不同"></a>navigator的跳转方式主要是open-type的选值不同</h4><ol>
<li>redirect 跳转时无法返回上级</li>
<li>navigator 正常跳转</li>
<li>switchTad 跳转tabbar页面</li>
<li>传参url=”../message/message?id=1&amp;age=18”</li>
<li>javascript代码跳转详情见 <a target="_blank" rel="noopener" href="https://uniapp.dcloud.io/api/router?id=navigateto">https://uniapp.dcloud.io/api/router?id=navigateto</a><h3 id="导入组件和vue一样-组件的生命周期和vue相同"><a href="#导入组件和vue一样-组件的生命周期和vue相同" class="headerlink" title="导入组件和vue一样(组件的生命周期和vue相同)"></a>导入组件和vue一样(组件的生命周期和vue相同)</h3><h4 id="uni-on-注册全局事件-uni-emit-接收全局事件"><a href="#uni-on-注册全局事件-uni-emit-接收全局事件" class="headerlink" title="uni.$on()注册全局事件,uni.$emit()接收全局事件"></a>uni.$on()注册全局事件,uni.$emit()接收全局事件</h4><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="title">created</span>(<span class="params"></span>)</span> &#123;<span class="comment">//一般注册1都是在元素未挂载之前注册</span></span><br><span class="line"> 	uni.$on(<span class="string">&quot;addNum&quot;</span>,<span class="function">(<span class="params">num</span>)=&gt;</span>&#123;<span class="comment">//注册事件</span></span><br><span class="line">	<span class="built_in">this</span>.num+=num</span><br><span class="line">&#125;)</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="function"><span class="title">btnClick</span>(<span class="params"></span>)</span>&#123;<span class="comment">//接收事件</span></span><br><span class="line">		uni.$emit(<span class="string">&quot;addNum&quot;</span>,<span class="number">10</span>)</span><br><span class="line">	&#125;</span><br></pre></td></tr></table></figure>
<h3 id="uni-app组件库可是非常好用的哦-❥"><a href="#uni-app组件库可是非常好用的哦-❥" class="headerlink" title="uni-app组件库可是非常好用的哦(❥(^_-))"></a>uni-app组件库可是非常好用的哦(❥(^_-))</h3></li>
</ol>

            <!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->
            <audio id="audio" loop="1" preload="auto" controls="controls" data-autoplay="false">
                <source type="audio/mpeg" src="">
            </audio>
            
                <ul id="audio-list" style="display:none">
                    
                        
                            <li title='0' data-url='http://link.hhtjim.com/163/425570952.mp3'></li>
                        
                    
                        
                            <li title='1' data-url='http://link.hhtjim.com/163/425570952.mp3'></li>
                        
                    
                </ul>
            
        </div>
        
    <div id='gitalk-container' class="comment link"
		data-enable='false'
        data-ae='false'
        data-ci=''
        data-cs=''
        data-r=''
        data-o=''
        data-a=''
        data-d='false'
    >查看评论</div>


    </div>
    
</div>


    </div>
</div>
</body>


<script src="//lib.baomitu.com/jquery/1.8.3/jquery.min.js"></script>
<script src="/hexo/js/plugin.js"></script>
<script src="/hexo/js/typed.js"></script>
<script src="/hexo/js/diaspora.js"></script>


<link rel="stylesheet" href="/hexo/photoswipe/photoswipe.css">
<link rel="stylesheet" href="/hexo/photoswipe/default-skin/default-skin.css">


<script src="/hexo/photoswipe/photoswipe.min.js"></script>
<script src="/hexo/photoswipe/photoswipe-ui-default.min.js"></script>


<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>
    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">
        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>
        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">
            <div class="pswp__top-bar">
                <!--  Controls are self-explanatory. Order can be changed. -->
                <div class="pswp__counter"></div>
                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
                <button class="pswp__button pswp__button--share" title="Share"></button>
                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                      <div class="pswp__preloader__cut">
                        <div class="pswp__preloader__donut"></div>
                      </div>
                    </div>
                </div>
            </div>
            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div> 
            </div>
            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>
            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>
            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>
        </div>
    </div>
</div>






</html>
